<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /* 子元素不设置width,它会继承父元素的width */
        *{padding:0px;margin:0px;}
        .one{
            width:50px;
            height:50px;
            background-color:red;

        }
        /* height特殊 父元素不设置height，它会获取子元素的高 */
    </style>
</head>
<body>
        <div  class="one"></div>
</body>
</html>